<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">

    <head>
        <meta charset="UTF-8"/>
        <title>Title</title>
    </head>

    <body>
        <h2>Thymeleaf</h2>
        <h3>信息</h3>
        <span th:text="${str}">后台传输的信息</span>
        <h3>表单</h3>
        <p>下标：<input type="text" name="aa" value="index" th:value="${stu.rowIndex}"/></p>
        <p>姓名：<input type="text" name="bb" value="name" th:value="${stu.userName}"/></p>
        <a href="http://www.jdy.com" th:href="@{http://www.baidu.com(id=${stu.rowIndex})}">链接</a>

        <h3>循环</h3>
        <ul>
            <li th:each="user:${users}" th:text="${user.userName}"></li>
        </ul>

        <table>
            <tr th:each="user:${users}">
                <td th:text="${user.rowIndex}"></td>
                <td th:text="${user.userName}"></td>
            </tr>
        </table>

        <h3>下拉菜单</h3>
        <select>
            <option th:each="s:${users}" th:value="${s.rowIndex}" th:text="${s.userName}" th:selected="${s.rowIndex=stu.rowIndex}"></option>
        </select>

        <img src="1111" th:src="${stu.rowIndex}"/>
    </body>

</html>